<template>
    <div id="editor">
        <p>{{placeholder}}</p>
    </div>
</template>
<script>
import E from 'wangeditor'
import 'wangeditor/release/wangEditor.min.css'
export default {
    name: 'VueWangEditor',
    props: {
        config: {
            type: Object,
            default: () => {}
        },
        placeholder: {
            type: String,
            default: () => '欢迎使用 <b>wangEditor</b> 富文本编辑器'
        }
    },
    data () {
        return {
            editor: null
        }
    },
    mounted () {
        this.editor = new E('#editor')
         // 忽略粘贴内容中的图片
        this.editor.customConfig.pasteIgnoreImg = true
        this.editor.create()
    }
}
</script>
<style scoped>

</style>

